package com.maxie.chain.impl;

import com.maxie.chain.ReimburseLink;

import java.math.BigDecimal;

public class ReimburseLinkDevManage extends ReimburseLink {

    public ReimburseLinkDevManage() {
    }


    @Override
    public void handleReimburse(BigDecimal money) {
        if (money.compareTo(new BigDecimal(1000)) <= 0){
            System.out.println("开发经理处理报销金额：" + money);
        } else {
            ReimburseLink next = super.next();
            if (next != null) {
                System.out.println("开发经理无法处理该金额的报销申请");
                next.handleReimburse(money);
            } else {
                System.out.println("无法处理该金额的报销申请：" + money);
            }
        }
    }
}
